From: John Audia Date: Sun, 5 Oct 2025 11:34:07 +0000 (-0400) Subject: snort3: depend on libtirpc only for musl builds X-Git-Url: http://git.openwrt.org/%22https:/collectd.org/%22http:/www.crowdsec.net//%22https%22/%22https:/collectd.org/%22http:/www.crowdsec.net/%22https%22?a=commitdiff_plain;h=4542296dbbe620369c4257a0b4819e1161a2840b;p=feed%2Fpackages.git snort3: depend on libtirpc only for musl builds The libtirpc package is only needed when building with musl, as glibc includes the required RPC functionality. This change makes libtirpc a conditional dependency and adjusts the build flags accordingly. Building with x86_64-glibc: ... Feature options: DAQ Modules: Dynamic libatomic: User-specified Hyperscan: ON ICONV: ON Libunwind: OFF LZMA: ON RPC DB: Built-in SafeC: OFF TCMalloc: ON JEMalloc: OFF UUID: ON NUMA: OFF LibML: OFF ... Building with aarch64_cortex-a76_musl: ... Feature options: DAQ Modules: Dynamic libatomic: User-specified Hyperscan: ON ICONV: ON Libunwind: OFF LZMA: ON RPC DB: TIRPC SafeC: OFF TCMalloc: ON JEMalloc: OFF UUID: ON NUMA: OFF LibML: OFF ... Build system: x86/64 Build-tested: x86/64-glibc, bcm27flogic/xiaomi_redmi-router-ax6000-ubootmod (for musl) Run-tested: x86/64-glibc Signed-off-by: John Audia (cherry picked from commit e4bdefe1c298b0dc3508d788a9a42eb2346f819e) --- diff --git a/net/snort3/Makefile b/net/snort3/Makefile index f221bf6cb8..2590818bdd 100644 --- a/net/snort3/Makefile +++ b/net/snort3/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=snort3 PKG_VERSION:=3.9.5.0 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/snort3/snort3/tar.gz/$(PKG_VERSION)? @@ -26,7 +26,7 @@ define Package/snort3 SECTION:=net CATEGORY:=Network DEPENDS:=+libstdcpp +libdaq3 +libdnet +libopenssl +libpcap +libpcre2 \ - +libpthread +libuuid +zlib +libhwloc +libtirpc @HAS_LUAJIT_ARCH +luajit +libatomic \ + +libpthread +libuuid +zlib +libhwloc +USE_MUSL:libtirpc @HAS_LUAJIT_ARCH +luajit +libatomic \ +kmod-nft-queue +liblzma +ucode +ucode-mod-fs +ucode-mod-uci \ +PACKAGE_gperftools-runtime:gperftools-runtime \ +PACKAGE_hyperscan-runtime:hyperscan-runtime @@ -44,7 +44,7 @@ define Package/snort3/description endef CMAKE_OPTIONS += \ - -DUSE_TIRPC:BOOL=YES \ + -DUSE_TIRPC=$(if $(CONFIG_USE_MUSL),ON,OFF) \ -DENABLE_STATIC_DAQ:BOOL=NO \ -DDAQ_INCLUDE_DIR=$(STAGING_DIR)/usr/include/daq3 \ -DDAQ_LIBRARIES_DIR_HINT:PATH=$(STAGING_DIR)/usr/lib/daq3 \ @@ -61,8 +61,7 @@ CMAKE_OPTIONS += \ -DENABLE_HYPERSCAN=$(if $(CONFIG_PACKAGE_vectorscan-runtime),ON,OFF) \ $(if $(CONFIG_PACKAGE_vectorscan-runtime),-DHS_INCLUDE_DIRS=$(STAGING_DIR)/usr/include/hs) -TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/daq3 -I$(STAGING_DIR)/usr/include/tirpc -TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/daq3 -ltirpc +TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/daq3 define Package/snort3/conffiles /etc/config/snort